package cn.itsource.org.mapper;

import cn.itsource.org.domain.Employee;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 部门mapper
 */
public interface EmployeeMapper extends Mapper<Employee> {
    //基础方法通过继承得到

    List<Employee> findManager();
    @Select("select * from t_employee where username=#{username} or phone=#{phone} or email=#{email}")
    List<Employee> selectUserNameOrPhoneOrEmail(Employee admin);
    @Select("select * from t_employee where username=#{username} or phone=#{username} or email=#{username}")
    Employee selectUsername(String username);
    @Select("select * from t_employee where shop_id=#{shopId}")
    List<Employee> findShopAllEmployee(Long shopId);
}
